package com.example.mycnblog.mapper;

import com.example.mycnblog.entity.Userinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    // 注册
    int reg(Userinfo userinfo);
    //根据用户名查询userinfo对象
    Userinfo getUserByName(@Param("username") String username);
    //根据用户id查询userinfo
    Userinfo getUserById(@Param("id")Integer id);

}
